package com.scut.scutzone.dao;

import com.scut.scutzone.entity.Follow;
import com.scut.scutzone.entity.User;
import com.scut.scutzone.vo.domain.FollowModel;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author: lifeng Chan
 * @date: 2021/4/30 01:14
 * @description:
 * Follow Data Access Mapper
 */
@Repository
public interface FollowAccess {
    void insertFollow(@Param("follow") Follow follow);
    void updateFollow(@Param("follow_id") int follow_id,@Param("status") int status);
    Follow getFollowById(@Param("follow_id") int follow_id);

    /**
     * 根据uuid,与被关注用户的username查询Follow对象，没有则返回空
     * @param uuid
     * @param username
     * @return
     */
    Follow getFollowByUUIDAndUserName(@Param("uuid") String uuid,@Param("username") String username);

    List<FollowModel> getFollowListByUserName(@Param("username") String username,@Param("limit") int limit);
    List<FollowModel> getFansListByUserName(@Param("username") String username,@Param("limit") int limit);
}
